public class O16 {
    public static void main(String[] args) {
        O16 o = new O16();
        System.out.println(o.myPow(2,8));
    }
    public double myPow(double x, int n) {
        if(x == 0)
            return 0;
        long b = n;
        double res = 1.0;
        if(b < 0) {
            x = 1 / x;
            b = -b;
        }
        while(b > 0) {
            if(b%2==1)
                res *= x;
            x *= x;
            b  = b/2;
        }
        return res;
    }
}
